package com.inibb.app.service.security;

import java.util.Collection;
import java.util.List;

import com.inibb.app.exception.ServiceVLDException;
import com.inibb.app.pagination.dto.PaginationCriteria;
import com.inibb.app.vo.UserSC;
import com.inibb.app.vo.security.UserVO;






/**
 * Local service for User.
 */
public interface IUserService {
   /**
    * @param name
    * @return the {@link UserVO} with name as the loginName
    */
	public UserVO getUserByLoginName(String name);
	
	public UserVO getUserById(String id);
	
	public void save (UserVO userDTO) throws ServiceVLDException;
	
	public void update (UserVO userDTO) throws ServiceVLDException;

	public void chanagePassword (UserVO userDTO) throws ServiceVLDException;

	
	public void changeActiveFlag (String userId) throws ServiceVLDException;

	public void delete (UserVO userDTO);
	
	public void delete (String userId);

	
	public Collection<UserVO> getAll ();
	
//	public Collection<UserDTO> searchUsersWithOrgId(final PaginationCriteria paginationCriteria, String orgId);
//	public Collection<UserVO> searchUsersWithRoleId(final PaginationCriteria paginationCriteria, String roleId);
//	public Collection<UserDTO> searchUsersWithGroupId(final PaginationCriteria paginationCriteria, String groupId);
	public Collection<UserVO> searchUsers(UserSC paginationCriteria);
	public Collection<UserVO> searchUsers(PaginationCriteria paginationCriteria);
//	public int countUsersWithOrgId(final PaginationCriteria paginationCriteria, String orgId);
//	public int countUsersWithRoleId(final PaginationCriteria paginationCriteria, String roleId);
//	public int countUsersWithGroupId(final PaginationCriteria paginationCriteria, String groupId);
	public int countUsers(UserSC paginationCriteria) ;
	public int countUsers(PaginationCriteria paginationCriteria) ;
	public boolean checkLoginNameExists(final String loginName);
	public boolean checkEmailExists(final String loginName);
	public List<String> searchGrantedUrls(Integer userId);
			
}
